package com.ex3;

public class Main {//客户端

    public static void main(String[] args) {
        int bufferSize = 10; // 缓冲池大小
        MessageQueue queue = new MessageQueue(bufferSize);
        Producer producer = new Producer(queue);
        Consumer consumer = new Consumer(queue);

        new Thread(producer).start();
        new Thread(consumer).start();
    }

}

